package com.kl.forum.api;

import com.kl.forum.service.MapMerchantService;
import com.kl.forum.util.ResultInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@Api("地图模块")
@RestController
@RequestMapping("/sh")
public class MapMerchantControllerAPI {

    @Autowired
    private MapMerchantService mapMerchantService;




    /**地图商户列表
     * @param type
     * @return
     */
    @ApiOperation(value = "地图商户列表",notes="地图")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "type", value = "类型", required = true, dataType = "String"),


    })
    @RequestMapping(value = "/ditu_list",method= RequestMethod.GET)
    public ResultInfo mapList(String type){
        return   mapMerchantService.mapList(type);
    }


    /**搜索
     * @param key
     * @return
     */
    @ApiOperation(value = "搜索",notes="地图")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "key", value = "关键词", required = true, dataType = "String"),


    })
    @RequestMapping(value = "/dituSerch",method= RequestMethod.GET)
    public ResultInfo dituSerch(String key){
        return   mapMerchantService.dituSerch(key);
    }

    /**类型
     * @param
     * @return
     */
    @ApiOperation(value = "类型",notes="地图")
    @ApiImplicitParams({
    })
    @RequestMapping(value = "/type",method= RequestMethod.GET)
    public ResultInfo shanghuType(){
        return   mapMerchantService.shanghuType();
    }



//    /**商户列表
//     * @param
//     * @return
//     */
//    @ApiOperation(value = "商户列表",notes="地图")
//    @ApiImplicitParams({
//            @ApiImplicitParam(name = "pageNumber", value = "", required = true, dataType = "String"),
//            @ApiImplicitParam(name = "lng", value = "", required = true, dataType = "String"),
//            @ApiImplicitParam(name = "lat", value = "", required = true, dataType = "String"),
//            @ApiImplicitParam(name = "findType", value = "", required = true, dataType = "String"),
//            @ApiImplicitParam(name = "storeType", value = "", required = true, dataType = "String"),
//
//
//    })
//    @RequestMapping(value = "/list2",method= RequestMethod.GET)
//    public ResultInfo list2(int pageNumber, double lng, double lat, int findType, String storeType){
//        return   mapMerchantService.mapList(pageNumber,lng,lat,findType,storeType);
//    }


}
